package com.uls.questionnaire.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.uls.common.annotation.Excel;
import com.uls.common.core.domain.BaseEntity;

/**
 * 问卷规则设置对象 zxh_surveyrules
 * 
 * @author zxh
 * @date 2024-11-09
 */
public class Surveyrules extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规则唯一标识 */
    private Long ruleId;

    /** 所属问卷的ID */
    @Excel(name = "所属问卷的ID")
    private Long questionnaireId;

    /** 最大参与人数 */
    @Excel(name = "最大参与人数")
    private Long maxresponses;

    /** 单用户参与限制次数 */
    @Excel(name = "单用户参与限制次数")
    private Long responselimit;

    /** 问卷开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "问卷开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 问卷结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "问卷结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 规则版本号 */
    private Long version;

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }
    public void setQuestionnaireId(Long questionnaireId) 
    {
        this.questionnaireId = questionnaireId;
    }

    public Long getQuestionnaireId() 
    {
        return questionnaireId;
    }
    public void setMaxresponses(Long maxresponses) 
    {
        this.maxresponses = maxresponses;
    }

    public Long getMaxresponses() 
    {
        return maxresponses;
    }
    public void setResponselimit(Long responselimit) 
    {
        this.responselimit = responselimit;
    }

    public Long getResponselimit() 
    {
        return responselimit;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("questionnaireId", getQuestionnaireId())
            .append("maxresponses", getMaxresponses())
            .append("responselimit", getResponselimit())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("version", getVersion())
            .toString();
    }
}
